#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/9/19 10:26
# @Author  : youfeng


class DataWrap(object):
    @staticmethod
    def empty_wrap():
        return {"total": 0, "data_list": []}

    @staticmethod
    def result_wrap(item):
        if not isinstance(item, dict):
            return DataWrap.empty_wrap()
        return {"total": 1, "data_list": [item]}
